{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}
<div class="modal fade" id="configureWorkfowModal" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Submit Workflow</h4>
      </div>
      <div class="modal-body">
        <div>
          <div>
            <div class="panel panel-default">
              <div class="panel-body">
            {{#if alertType}}
            <div id="error" class="alert alert-{{alertType}}">
              <div>{{alertMessage}}</div>
              <div>{{alertDetails}}</div>
            </div>
            {{/if}}
            <div class="row form-group">
              <div class="col-xs-3">
                <label class="control-label" for="Workflow Path">Workflow Pathdafxg</label><span class="requiredField">&nbsp;*</span>
              </div>
              <div class="col-xs-8">
                <div class="input-group">
                  {{input class="form-control" type="text"  value=filePath}}
                  <span class="input-group-btn">
                  <button type="button" class="btn btn-secondary" {{action "selectWorflowFile"}}>Browse</button>
                </span>
                </div>
                {{input type="checkbox" checked=overwriteWorkflowPath}}Overwrite
              </div>
            </div>
            <div class="row">
              <div class="col-xs-3">
                  <label class="control-label">Execution Settings</label>
              </div>
              <div class="col-xs-8">
              {{#each systemConfigs as |config|}}
                <div>
                  {{input type="checkbox" checked=config.value}}{{config.displayName}}
                </div>
              {{/each}}
            </div>
            </div>
          </div>
        </div>


            <div  id="jobProperties">
              {{#if configMap.length}}
              <div class="panel panel-default">
                <div class="panel-heading">
                  Job Properties
                </div>
                <div class="panel-body">
                {{#each configMap as |prop|}}
                  <div class="row form-group">
                    <div class="col-xs-3">
                      <label class="control-label" for="{{prop}}">{{prop.name}}</label>
                      {{#if prop.isRequired}}
                        <span class="requiredField">&nbsp;*</span>
                      {{/if}}
                    </div>
                    <div class="col-xs-8">
                      {{input class="form-control" type="text" value=prop.value}}
                    </div>
                  </div>
                {{/each}}
                </div>
              </div>
              {{/if}}

            </div>
          </div>
        </div>
      </div>
      <div class="modal-footer">
        {{#if savingInProgress}}
          <span class="pull-left">Saving Workflow</span>{{spin-spinner lines=8 length=5 width=3 radius=5 top=320 left=425}}
        {{/if}}
        {{#if startingInProgress}}
          <span class="pull-left">Starting Workflow</span>{{spin-spinner lines=8 length=5 width=3 radius=5 top=320 left=425}}
        {{/if}}
        <button type="button" class="btn btn-primary" {{action "save"}}>Submit</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
{{#if showingFileBrowser}}
{{hdfs-browser closeFileBrowser="closeFileBrowser" selectFileCallback=selectFileCallback filePath=filePath}}
{{/if}}
